package decorator;

/**
 * @Author：LJ
 * @Description：抽象装饰者
 * @Date: 2017/11/30
 * @Modified By:
 */
public abstract class Decorator extends Component {
    private Component component=null;

    //通过构造函数传递给被修饰者
    public Decorator(Component component) {
        this.component = component;
    }

    @Override
    void operate() {
        component.operate();
    }
}
